package com.igeekhome.dao;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.igeekhome.pojo.AttendanceStatistics;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 考勤表 Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2021-03-16
 */
public interface AttendanceStatisticsMapper extends BaseMapper<AttendanceStatistics> {
    @Select("select Max(loginTime) as loginTime from attendance_statistics ${ew.customSqlSegment}")
    int getlogin(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Max(freeTime) as freeTime from attendance_statistics ${ew.customSqlSegment}")
    int getfree(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Max(busyTime) as busyTime from attendance_statistics ${ew.customSqlSegment}")
    int getbusy(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Max(onlineTime) as onlineTime from attendance_statistics ${ew.customSqlSegment}")
    int getonline(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("select Max(offlineTime) as offlineTime from attendance_statistics ${ew.customSqlSegment}")
    int getoffice(@Param(Constants.WRAPPER) Wrapper wrapper);
}
